{% macro gen_table(stats) %}
    <table id="user-info-table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>事件</th>
                <th>日期</th>
                <th>次数</th>
            </tr>
        </thead>
        <tbody>
            {% for stat in stats %}
            <tr>
                <td>{{ stat.id }}</td>
                <td>{{ stat.event }}</td>
                <td>{{ stat.date }}</td>
                <td>{{ stat.count }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endmacro %}
